public class UserService {
    private UserDao userDao;

    public UserService(UserDao userDao){
        this.userDao = userDao;
    }

    public boolean login(String username, String password){
        User user = userDao.findUser(username);
        return user != null && user.getPassword().equals(password);
    }
}